<template>
  <div class="setweek">
    <el-form
      :model="ruleForm"
      ref="ruleForm"
      label-width="100px"
      class="demo-ruleForm"
    >
      <el-form-item label="开始时间">
        <el-date-picker
          v-model="ruleForm.date"
          type="datetime"
          placeholder="选择日期时间"
        >
        </el-date-picker>
      </el-form-item>
      <el-form-item label="间隔时间">
        <el-input-number
          v-model="num"
          :min="1"
          :max="10"
          label="描述文字"
        ></el-input-number
        ><span>周</span>
      </el-form-item>

      <el-form-item label="周">
        <el-checkbox-group v-model="checkList">
          <el-checkbox label="星期一"></el-checkbox>
          <el-checkbox label="星期二"></el-checkbox>
          <el-checkbox label="星期三"></el-checkbox>
          <el-checkbox label="星期四"></el-checkbox>
          <el-checkbox label="星期五"></el-checkbox>
          <el-checkbox label="星期六"></el-checkbox>
          <el-checkbox label="星期日"></el-checkbox>
        </el-checkbox-group>
      </el-form-item>

      <el-form-item label="是否立即执行">
        <!-- `checked` 为 true 或 false -->
        <el-checkbox v-model="checked"></el-checkbox>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
export default {
  data: () => ({
    //数组或对象
    ruleForm: {
      date: "",
    },
    checkList: [
      "星期一",
      // "星期二",
      // "星期三",
      // "星期四",
      // "星期五",
      // "星期六",
      // "星期日",
    ],

    //数值
    num: 1,

    //布尔值
    checked: true,
  }),
  created() {},
  methods: {},
};
</script>

<style lang="less" scoped>
.setweek {
  .el-form-item {
    margin-bottom: 20px;
    span {
      display: inline-block;
      margin-left: 10px;
    }
  }
  .el-form-item:nth-child(4) {
    margin-left: 20px;
  }
}
</style>